/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package edu.infomatik.tundra.logic;

import edu.infomatik.tundra.data.ILogicBean;
import edu.infomatik.tundra.logic.UStoryTypes;
import edu.infomatik.tundra.util.TundraConstants;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>UStory</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link edu.infomatik.tundra.UStoryBean.impl.UStoryImpl#getType <em>Type</em>}</li>
 *   <li>{@link edu.infomatik.tundra.UStoryBean.impl.UStoryImpl#getPriority <em>Priority</em>}</li>
 *   <li>{@link edu.infomatik.tundra.UStoryBean.impl.UStoryImpl#getPoValue <em>Po Value</em>}</li>
 *   <li>{@link edu.infomatik.tundra.UStoryBean.impl.UStoryImpl#getRealize <em>Realize</em>}</li>
 *   <li>{@link edu.infomatik.tundra.UStoryBean.impl.UStoryImpl#getLinkedWith <em>Linked With</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class UStoryBean extends AChitChatBean implements ILogicBean{
	private final UStoryTypes DEFAULT_TYPE = UStoryTypes.CLEAR;		
	private UStoryTypes type=DEFAULT_TYPE;
	private long projectId;
	private long sprintId;
	private long priority;
	private long poValue;
	private long linkedWith;


	public UStoryBean() {
		super();
		setKind(WorkKinds.USTORY);
	}

	public short getType() {
		return (short)this.type.getValue();
	}

	public void setType(short type) {
		if (null == (this.type=UStoryTypes.get(type)))
			this.type=UStoryTypes.OTHER;
	}

	public void setType(UStoryTypes type) {
			this.type=type;
	}

	public long getPriority() {
		return priority;
	}

	public void setPriority(long priority) {
		this.priority = priority;
	}

	public long getPoValue() {
		return poValue;
	}

	public void setPoValue(long poValue) {
		this.poValue = poValue;
	}

	public long getLinkedWith() {
		return linkedWith;
	}

	public void setLinkedWith(long linkedWith) {
		this.linkedWith = linkedWith;
	}
	public long getProjectId() {
		return projectId;
	}
	public void setProjectId(long projectId) {
		this.projectId = projectId;
	}
	public long getSprintId() {
		return sprintId;
	}
	public void setSprintId(long sprintId) {
		this.sprintId = sprintId;
	}
	@Override
	public short getClassId() {
		return TundraConstants.USER_STORY_CLASS;
	}
}
